/***************************************************************/
/*                                                             */
/*        User include file for Chain Menu Designer            */
/*        (c) 1991-1993 D&D                                    */
/*                                                             */
/***************************************************************/

typedef unsigned char   BYTE ;
typedef struct svimage  IHANDLER ;

struct svimage {
	int       dy        ;
	BYTE      SavePlace ;
	int       EmsPage   ;
	char      Fname[15] ;
	void*     Buffer    ;
} ;

#ifdef __cplusplus
extern "C" {
#endif

int SaveImage(IHANDLER*,int,int,int,int),  /* Save image           */
    AddHotKey(void (*UserFunction)(),int),
    sedit(int,int,int,char**,char**,char**,char*,int i=22,int j=25) ;


void fcall(int),                           /* Entry for menu calls */
     ReleaseImage(IHANDLER*,int,int),      /* Restore image        */
     HideMenus(int),                       /* Hide menus           */
     ActivateMenu(int,void (*pr)(int)),    /* Activate system      */
     SetQuit(int),                         /* Quit mode from menu  */
     text(int,int,char*),                  /* Out text ( XOR )     */
     quit(void) ,                          /* Shutdown system      */
     initialize(char*,int),                /* Init menu system     */
     UserBackground(void),
     SetHelp(int),
     SetMouse(int),
     UndoMenu(int) ;			   /* Undo some levels of menu */

char strbox(char*) ;                       /* Messaging procedure  */

#ifdef __cplusplus
}
#endif


#define GM_EGA        0                    /* 640x350x16           */
#define GM_VGA        1                    /* 640x480x16           */
#define GM_SUCCESS    0                    /* Init return status   */
#define GM_FAIL       1                    /* ..................   */
#define GM_ON         1                    /* Enable user quit on  */
#define GM_OFF        0                    /* Alt-F10 / Disable    */
#define GM_HIDE_ALL   0                    /* hide_menu options    */
#define GM_HIDE_PART  1                    /* only first stay      */

/* Some keys code definition */

#define kbF1		15104
#define kbF2		15360
#define kbF3		15616
#define kbF4		15872
#define kbF5		16128
#define kbF6		16384
#define kbF7		16640
#define kbF8		16896
#define kbF9		17157
#define kbF10		17408

#define kbCtrlF1	24064
#define kbCtrlF2	24320
#define kbCtrlF3	24576
#define kbCtrlF4	24832
#define kbCtrlF5	25088
#define kbCtrlF6	25344
#define kbCtrlF7	25600
#define kbCtrlF8	25856
#define kbCtrlF9	26112
#define kbCtrlF10	26368

#define kbAltF1		26624
#define kbAltF2		26880
#define kbAltF3		27136
#define kbAltF4		27392
#define kbAltF5		27648
#define kbAltF6		27904
#define kbAltF7		28160
#define kbAltF8		28416
#define kbAltF9		28672
#define kbAltF10	28928

extern int TH ;                            /* Text height          */
extern int MaxX ;                          /* Screen size in       */
extern int MaxY ;                          /*  pixels              */